import request from './request';

export function getBranchList(params) {
  return request({ url: '/api/v1/branches', method: 'get', params });
}

export function getBranchesByClanId(clanId) {
  return request({ url: `/api/v1/branches/clan/${clanId}`, method: 'get' });
}

export function addBranch(data) {
  return request({ url: '/api/v1/branches', method: 'post', data });
}
export function updateBranch(data) {
  return request({ url: `/api/v1/branches/${data.id}`, method: 'put', data });
}
export function deleteBranch(id) {
  return request({ url: `/api/v1/branches/${id}`, method: 'delete' });
} 